home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / man / cat3 / XmCreateOptionMenu.z / XmCreateOptionMenu
Encoding:
Text File  |  2003-11-18  |  7.3 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))    UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV    XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       _X_m_C_r_e_a_t_e_O_p_t_i_o_n_M_e_n_u - A RowColumn widget convenience creation
  10.       function
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       #include <Xm/RowColumn.h>
  14.  
  15.       Widget XmCreateOptionMenu (ppppaaaarrrreeeennnntttt,,,, nnnnaaaammmmeeee,,,, aaaarrrrgggglllliiiisssstttt,,,, aaaarrrrggggccccoooouuuunnnntttt)
  16.            _W_i_d_g_e_t     ppppaaaarrrreeeennnntttt;
  17.            _S_t_r_i_n_g     nnnnaaaammmmeeee;
  18.            _A_r_g_L_i_s_t     aaaarrrrgggglllliiiisssstttt;
  19.            _C_a_r_d_i_n_a_l     aaaarrrrggggccccoooouuuunnnntttt;
  20.  
  21.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.       _X_m_C_r_e_a_t_e_O_p_t_i_o_n_M_e_n_u creates an    instance of a RowColumn    widget
  23.       of type _X_m_M_E_N_U__O_P_T_I_O_N    and returns the    associated widget ID.
  24.  
  25.       It is    provided as a convenience function for creating    a
  26.       RowColumn widget configured to operate as an OptionMenu and
  27.       is not implemented as    a separate widget class.
  28.  
  29.       The OptionMenu widget    is a specialized RowColumn manager
  30.       composed of a    label, a selection area, and a single Pulldown
  31.       MenuPane.  When an application creates an OptionMenu widget,
  32.       it supplies the label    string and the Pulldown    MenuPane.  In
  33.       order    to succeed, there must be a valid _X_m_N_s_u_b_M_e_n_u_I_d
  34.       resource set when calling this function.  When the
  35.       OptionMenu is    created, the Pulldown MenuPane must have been
  36.       created as a child of    the OptionMenu's parent    and must be
  37.       specified.  The LabelGadget and the selection    area (a
  38.       CascadeButtonGadget) are created by the OptionMenu.
  39.  
  40.       The OptionMenu's Pulldown MenuPane must not contain any
  41.       ToggleButtons    or ToggleButtonGadgets.     The results of
  42.       including CascadeButtons or CascadeButtonGadgets in the
  43.       OptionMenu's Pulldown    MenuPane are undefined.
  44.  
  45.       An OptionMenu    is laid    out with the label displayed on    one
  46.       side of the widget and the selection area on the other side
  47.       when _X_m_N_o_r_i_e_n_t_a_t_i_o_n is XmHORIZONTAL.    If the value is
  48.       XmVERTICAL, the label    is above the selection area. The
  49.       selection area has a dual purpose; it    displays the label of
  50.       the last item    selected from the associated Pulldown
  51.       MenuPane, and    it provides the    means for posting the Pulldown
  52.       MenuPane.
  53.  
  54.       The OptionMenu typically does    not display any    3-D visuals
  55.       around itself    or the internal    LabelGadget.  By default, the
  56.       internal CascadeButtonGadget has a visible 3-D shadow.  The
  57.       application may change this by getting the
  58.       CascadeButtonGadget ID using _X_m_O_p_t_i_o_n_B_u_t_t_o_n_G_a_d_g_e_t, and then
  59.       calling _X_t_S_e_t_V_a_l_u_e_s using the    standard visual-related
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 11/11/03)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))    UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV    XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
  71.  
  72.  
  73.  
  74.       resources.
  75.  
  76.       The Pulldown MenuPane    is posted by moving the    mouse pointer
  77.       over the selection area and pressing a mouse button defined
  78.       by OptionMenu's RowColumn parent.  The Pulldown MenuPane is
  79.       posted and positioned    so that    the last selected item is
  80.       directly over    the selection area.  The mouse is then used to
  81.       arm the desired menu item.  When the mouse button is
  82.       released, the    armed menu item    is selected and    the label
  83.       within the selection area is changed to match    that of    the
  84.       selected item.  By default, _B_S_e_l_e_c_t is used to interact with
  85.       an OptionMenu.  The default can be changed via the RowColumn
  86.       resource _X_m_N_m_e_n_u_P_o_s_t.
  87.  
  88.       The OptionMenu also operates by using    the keyboard interface
  89.       mechanism.  If the application has established a mnemonic
  90.       with the OptionMenu, typing Alt with the mnemonic causes the
  91.       Pulldown MenuPane to be posted with traversal    enabled.  The
  92.       standard traversal keys can then be used to move within the
  93.       MenuPane.  Selection can occur as the    result of pressing the
  94.       Return key or    typing a mnemonic or accelerator for one of
  95.       the menu items.
  96.  
  97.       An application may use the _X_m_N_m_e_n_u_H_i_s_t_o_r_y resource to
  98.       indicate which item in the Pulldown MenuPane should be
  99.       treated as the current choice    and have its label displayed
  100.       in the selection area.  By default, the first    item in    the
  101.       Pulldown MenuPane is used.
  102.  
  103.       ppppaaaarrrreeeennnntttt
  104.            Specifies the parent widget ID
  105.  
  106.       nnnnaaaammmmeeee Specifies the name of the created widget
  107.  
  108.       aaaarrrrgggglllliiiisssstttt
  109.            Specifies the argument list
  110.  
  111.       aaaarrrrggggccccoooouuuunnnntttt
  112.            Specifies the number of attribute/value pairs in    the
  113.            argument    list (aaaarrrrgggglllliiiisssstttt)
  114.  
  115.       The user can specify resources in a resource file for    the
  116.       automatically    created    widgets    and gadgets of an OptionMenu.
  117.       The following    list identifies    the names of these widgets (or
  118.       gadgets) and the associated OptionMenu areas.
  119.  
  120.       +o
  121.  
  122.       +o    Option Menu Label Gadget    - "OptionLabel"
  123.  
  124.       +o    Option Menu Cascade Button - "OptionButton"
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 11/11/03)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))    UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV    XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
  137.  
  138.  
  139.  
  140.       For a    complete definition of RowColumn and its associated
  141.       resources, see _X_m_R_o_w_C_o_l_u_m_n(_3_X).
  142.  
  143.      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  144.       Returns the RowColumn    widget ID.
  145.  
  146.      RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  147.       _X_m_C_a_s_c_a_d_e_B_u_t_t_o_n_G_a_d_g_e_t(_3_X), _X_m_C_r_e_a_t_e_P_u_l_l_d_o_w_n_M_e_n_u(_3_X),
  148.       _X_m_C_r_e_a_t_e_S_i_m_p_l_e_O_p_t_i_o_n_M_e_n_u(_3_X),    _X_m_L_a_b_e_l_G_a_d_g_e_t(_3_X),
  149.       _X_m_O_p_t_i_o_n_B_u_t_t_o_n_G_a_d_g_e_t(_3_X), _X_m_O_p_t_i_o_n_L_a_b_e_l_G_a_d_g_e_t(_3_X),
  150.       _X_m_R_o_w_C_o_l_u_m_n(_3_X), and _X_m_V_a_C_r_e_a_t_e_S_i_m_p_l_e_O_p_t_i_o_n_M_e_n_u(_3_X).
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 11/11/03)
  196.  
  197.  
  198.  
  199.